<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">
    <body> 
	  <h:panelGrid columns="2">
		<h:panelGroup>
                    <h:graphicImage width="100" url="#{TeacherBean.profilePicture()}"/>
		    <h:panelGroup>
		    <h:outputLabel value="Durum: "/>
		    <p:inplace>
			  <p:inputText disabled="#{TeacherBean.same()==false}" value="#{TeacherBean.target.status}" />
		    </p:inplace>
		    <p:commandButton rendered="#{TeacherBean.same()}" ajax="false" action="#{TeacherBean.changeStatus()}" value="Durum değiştir"/>
                    <p:commandButton rendered="#{TeacherBean.same()}" value="Danışman Olduğun Öğrenciler" onclick="mentoredStudents.show();"/>
		    </h:panelGroup>
		    <h:panelGrid columns="2">
			  <h:outputLabel value="Ad:"/>
			  <h:outputLabel value="#{TeacherBean.target.firstName}"/>
			  <h:outputLabel value="Soyad:"/>
			  <h:outputLabel value="#{TeacherBean.target.lastName}"/>
			  <h:outputLabel value="E-Posta:"/>
			  <h:outputLabel value="#{TeacherBean.target.email}"/>
			  <h:outputLabel value="Verdiği Dersler: "/>
			  <p:dataList var="course" value="#{TeacherBean.courses()}">
				<p:column>
				<p:commandLink value="#{course.NAME}" action="#{HomePageBean.clickCourse()}" ajax="false">
				    <f:setPropertyActionListener value="#{course}" target="#{CourseBean.target}"/>
				</p:commandLink>
				</p:column>
			  </p:dataList>
		    </h:panelGrid>
		</h:panelGroup>
		
	  </h:panelGrid>
    </body>
</html>
